package per.jdz.socket.client;

import per.jdz.filter.FilterData;
import per.jdz.filter.FilterResponse;
import per.jdz.filter.client.ClientBeforeFilter;
import per.jdz.socket.codec.RpcRequest;

/**
 * @description:
 * @Author: Jdz
 * @CreateTime: 2024-03-17 14:13
 */
public class ClientTokenFilter implements ClientBeforeFilter {
    @Override
    public FilterResponse doFilter(FilterData<RpcRequest> filterData) {
        final RpcRequest rpcRequest = filterData.getObject();
        rpcRequest.getClientAttachments().put("token","xhy");
        return new FilterResponse(true,null);
    }
}
